<template>
  <div class="author-rank-list">
    <author-rank-item
        v-for="author in authors"
        :key="author.userId"
        :author="author"
    />
  </div>
</template>

<script>
import AuthorRankItem from "@/views/detail/author-rank/author-rank-item";
import user from "@/api/user";

export default {
  name: "author-rank-list",
  components: {AuthorRankItem},
  data() {
    return {
      authors: []
    }
  },
  created() {
    user.rank()
        .then((res) => {
          this.authors = res.data
        })
  }
}
</script>

<style lang="less" scoped>
.author-rank-list {
  background-color: #fff;
  width: 800px;
  margin: 10px auto;
}
</style>